﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using CommunityToolkit.Mvvm.DependencyInjection;
using XiaFControl.Controls;
using XiaFControl.Demo.Common;
using XiaFControl.Demo.ViewModels;

namespace XiaFControl.Demo.Views
{
    /// <summary>
    /// DialogDemo.xaml 的交互逻辑
    /// </summary>
    public partial class DialogDemo : UserControl
    {
        public DialogDemo()
        {
            InitializeComponent();
        }

        private void showBtn_Click(object sender, RoutedEventArgs e)
        {
            DialogContent dialogContent = new DialogContent();
            Dialog.Show(dialogContent);
            Message.ShowInfo("Show");
        }

        private void showDialogBtn_Click(object sender, RoutedEventArgs e)
        {
            DialogContent dialogContent = new DialogContent();
            var result = Dialog.ShowDialog(dialogContent);
            Message.ShowInfo("ShowDialog");
        }
        private void showInContainerBtn_Click(object sender, RoutedEventArgs e)
        {
            DialogContent dialogContent = new DialogContent();
            Dialog.ShowInContainer(Global.DialogContainerKey, dialogContent);
            Message.ShowInfo("Show");
        }

        private async void showDialogInContainerBtn_Click(object sender, RoutedEventArgs e)
        {
            DialogContent dialogContent = new DialogContent();
            var result = await Dialog.ShowDialogInContainer(Global.DialogContainerKey, dialogContent);
            Message.ShowInfo("ShowDialog");
        }
    }
}
